package com.txts.road.app.event.model.dto;

import java.io.Serial;
import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.*;

/**
 * 赛事新闻表单对象
 *
 * @author baoyr
 * @since 2025-07-17 10:47
 */
@Getter
@Setter
@Schema(description = "赛事新闻表单对象")
public class EventNewsDTO implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "新闻ID")
    @NotNull(message = "新闻ID不能为空")
    private Long id;

    @Schema(description = "赛事ID")
    private Long eventId;

    @Schema(description = "新闻标题")
    @NotBlank(message = "新闻标题不能为空")
    @Size(max=200, message="新闻标题长度不能超过200个字符")
    private String title;

    @Schema(description = "新闻摘要")
    @Size(max=500, message="新闻摘要长度不能超过500个字符")
    private String summary;

    @Schema(description = "新闻内容")
    @NotNull(message = "新闻内容不能为空")
    @Size(max=-1, message="新闻内容长度不能超过-1个字符")
    private String content;

    @Schema(description = "封面图片")
    @Size(max=500, message="封面图片长度不能超过500个字符")
    private String coverImage;

    @Schema(description = "作者")
    @Size(max=50, message="作者长度不能超过50个字符")
    private String author;

    @Schema(description = "浏览次数")
    private Integer viewCount;

    @Schema(description = "是否热门：0-否，1-是")
    private Integer isHot;

    @Schema(description = "发布时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime publishTime;

   


}
